<form action="" class="form-horizontal" role="form">
  <div class="form-group">
      <label class="col-sm-2 control-label">合作商名称</label>
      <div class="col-sm-2">
        <input type="text" class="form-control" name="name" placeholder="" datatype="*2-20" value="{$partner['name']}">
      </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">合作商邮箱</label>
    <div class="col-sm-3">
      <input type="email" class="form-control" name="email" placeholder="作为合作商登录后台账号" datatype="e" value="{$partner['email']}"/>
    </div>
  </div>
  <div class="form-group">
      <label class="col-sm-2 control-label">合作商联系人</label>
      <div class="col-sm-3">
        <input type="text" class="form-control" name="contacts" placeholder="" datatype="*1-10" value="{$partner['contacts']}">
      </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">联系人电话</label>
    <div class="col-sm-3">
      <input type="text" class="form-control" name="tel" placeholder="" datatype="phone" value="{$partner['tel']}"/>
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">登录密码</label>
    <div class="col-sm-3">
      <input type="password" class="form-control" name="password" placeholder="密码大于6位小于16位，不填写既为不修改">
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">重复登录密码</label>
    <div class="col-sm-3">
      <input type="password" class="form-control" placeholder="重复刚才输入的密码" />
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">合作商地区</label>
    <div class="row">
      <div class="col-sm-2">
        <select class="form-control" id="province" name="province" datatype="*">{$partner.provinceOptions}</select>
      </div>
      <div class="col-sm-2">
        <select class="form-control" id="city" name="city" datatype="*">{$partner.cityOptions}</select>
      </div>
      <div class="col-sm-2">
        <select class="form-control" id="area" name="area" datatype="*">{$partner.areaOptions}</select>
      </div>    
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">合作商具体地址</label>
    <div class="col-sm-3">
      <input type="text" class="form-control" name="address" placeholder="合作商的具体地址" datatype="*" value="{$partner['address']}" />
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">审核状态</label>
    <div class="col-sm-3">
      <select class="form-control" id="is_passed" name="is_passed" datatype="*">{$partner.isPassedOptions}</select>
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">合作商技术支持信息</label>
    <div class="col-sm-5">
      <textarea type="text" class="form-control" name="support" placeholder="技术支持信息" rows="3">{$partner['support']}</textarea>
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">是否允许显示合作商技术支持信息</label>
    <div class="col-sm-3">
      <label class="checkbox">
      <input type="checkbox" name="support_allowed" value="1" <eq name="partner.support_allowed" value="1">checked="checked"</eq> /> 是否允许客户网站显示合作商的技术支持信息
      </label>
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">合作商英文标记</label>
    <div class="col-sm-3">
      <input type="text" class="form-control" name="label" placeholder="英文标记" value="{$partner['label']}"/>
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">合作商logo</label>
    <div class="col-sm-5">
      <input type="text" class="form-control" name="logo" placeholder="公司logo" value="{$partner['logo']}"/>
    </div>
  </div>
  
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-8">
      <input type="hidden" name="id" value="{$partner['id']}" />
      <button type="submit" class="btn btn-primary submit" data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/modifyPost">保存更改</button>
    </div>
  </div>
</form>

<script type="text/javascript">
  $(function(){
    $("#province").change(function(){
      var pro = $(this).val()
      $.post("__CONTROLLER__/getCityPost", {code: pro} ,function(data){
        $("#city").html(data);
      });
    });
    
    $("#city").change(function(){
      var cit = $(this).val()
      $.post("__CONTROLLER__/getAreaPost", {code: cit} ,function(data){
        $("#area").html(data);
      });
    });
  });
</script>